import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 引入全局样式，去除html默认样式
import './assets/css/reset.css'
import './assets/css/common.css'

// 全局引入element-ui 插件
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// 引入axios插件
import Axios from 'axios'
// 引入rsa加密插件
import JSEncrypt from 'jsencrypt'
Vue.prototype.$getRsaCode = function (str) { // 注册方法
  const pubKey = window.localStorage.getItem('publicKey')
  const encryptStr = new JSEncrypt()
  encryptStr.setPublicKey(pubKey)
  const data = encryptStr.encrypt(str.toString())
  return data
}

Vue.prototype.$axios = Axios
Vue.use(ElementUI)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
